-
-
Notifications
You must be signed in to change notification settings - Fork 102
[AI Bundle] Trace and display AgentInterface
calls in Profiler
#570
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
AgentInterface
calls in Profiler
AgentInterface
calls in ProfilerAgentInterface
calls in Profiler
Can you please add a screenshot to the PR header? |
ae4e956
to
c1d32f4
Compare
899f7db
to
95d76eb
Compare
|
||
public function collect(Request $request, Response $response, ?\Throwable $exception = null): void | ||
{ | ||
$this->lateCollect(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why this change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seemed redundant to call late collect since it will be called on kernel.terminate
so i've removed it, also it's going againts the idea of implementing LateDataCollectorInterface
to me, do you think it's relevant ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was introduced in #173 with the reason - does this change break the profiler on streaming?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working on this @Griffon-Weglot!
One thing that would help is to move the input/output html conversion that is used on the platform calls to some macro, that we can use it on the agent and on the platform. so we wouldn't need to just dump the those.
556f48a
to
67898ff
Compare
67898ff
to
81b39d8
Compare
81b39d8
to
100cb55
Compare
@chr-hertel to simplify the display i've used |
AgentInterface
calls in ProfilerAgentInterface
calls in Profiler
$calls = $platform->calls; | ||
foreach ($calls as $key => $call) { | ||
$result = $call['result']->await(); | ||
|
||
if (isset($platform->resultCache[$result])) { | ||
$call['result'] = $platform->resultCache[$result]; | ||
} else { | ||
$call['result'] = $result->getContent(); | ||
} | ||
|
||
$calls[$key] = $call; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is that necessary? also see #173 for reasoning
Sure ! Thanks for your feedbacks i'll make those changes asap |
Uh oh!
There was an error while loading. Please reload this page.